<c:if test="${not empty pbom}">
    <h3>工艺设计顶层结构信息</h3>
</c:if>
<div class="box_tc_s" style="height: auto">
    <form data-id="baseForm" action="" method="post">
        <table data-id="formDetail" border="1" class="hydra-table" cellpadding="0" cellspacing="0">
            <tbody>
            <tr>
                <td class="hydra-left"><span class="nes-tip">*</span>结构名称：</td>
                <td class="hydra-right">
                    <input type="hidden" value="${pbom.id}" data-id="id" name="id"/>
                    <input type="text" data-id="pName" name="pName" class="easyui-validatebox hydra-input-width"
                           data-options="required:true,validType:['length[0,20]']" placeholder="结构名称.."
                           value="${pbom.pName}"/>
                    <input type="hidden" name="number" value="${pbom.number}"/>
                </td>
            </tr>
            <tr class="hydra-tr-bg">
                <td class="hydra-left"><span class="nes-tip">*</span>结构编码：</td>
                <td class="hydra-right">
                    <input type="text" data-id="code" name="code" class="easyui-validatebox hydra-input-width"
                           data-options="required:true,validType:['length[0,20]']"
                           placeholder="结构编码.." value="${pbom.code}"/>
                </td>
            </tr>
            <tr>
                <td class="hydra-left">制造分类：</td>
                <td class="hydra-right">
                    <select data-id="bomType" name="bomType" class="easyui-validatebox hydra-input-width">
                        <c:forEach items="${bomTypes}" var="bomType">
                            <option value="${bomType.dirValue}">${bomType.dirValue}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
            <tr class="hydra-tr-bg">
                <td class="hydra-left">备注:</td>
                <td class="hydra-right">
                    <textarea data-id="remark"
                              autocomplete="off" name="remark"
                              class="easyui-validatebox hydra-input-width hydra-textarea"
                              data-options="validType:['normalChar','length[0,400]']"
                              placeholder="备注..">${pbom.remark}</textarea>
                </td>
            </tr>
        </table>
    </form>
</div>
<c:choose>
    <c:when test="${empty pbom}">
        <div>
            <a data-id="next" href="javascript:void(0)" iconCls="fa fa-check fa-lg">下一步</a>
            <a data-id="cancel" href="javascript:void(0)" iconCls="fa fa-remove fa-lg">取消</a>
        </div>
    </c:when>
    <c:otherwise>
        <h2>工艺下级结构信息</h2>

        <div data-id="news_tb" class="nsdb">
            <a data-key="add" href="javascript:void(0)" iconCls="fa fa-plus fa-lg" plain="true">添加节点</a>
            <a data-key="choose" href="javascript:void(0)" iconCls="fa fa-mouse-pointer fa-lg" plain="true">选择节点</a>
        </div>
        <div data-id="user_list_btn">
            <a data-href="#" data-id="{{id}}" data-key="moveOut" iconCls="fa fa-long-arrow-left fa-lg"
               plain="true">上升一级</a>
            <a data-href="#" data-id="{{id}}" data-key="moveUp" iconCls="fa fa-long-arrow-up fa-lg" plain="true">上移</a>
            <a data-href="#" data-id="{{id}}" data-key="moveDown" iconCls="fa fa-long-arrow-down fa-lg"
               plain="true">下移</a>
            <a data-href="#" data-id="{{id}}" data-key="moveIn" iconCls="fa fa-long-arrow-right fa-lg"
               plain="true">下降一级</a>
            <a data-href="#" data-id="{{id}}" data-key="remove" iconCls="fa fa-trash fa-lg" plain="true">移除</a>
            <a data-href="#" data-id="{{id}}" data-key="view" iconCls="fa fa-eye fa-lg" plain="true">查看</a>
        </div>
        <div class="grid-wrap">
            <table data-id="grid"></table>
        </div>
        <div>
            <a data-id="save" href="javascript:void(0)" iconCls="fa fa-save fa-lg">保存并发布</a>
            <a data-id="saveDraft" href="javascript:void(0)" iconCls="fa fa-file-o fa-lg">保存</a>
            <a data-id="cancel" href="javascript:void(0)" iconCls="fa fa-remove fa-lg">取消</a>
        </div>
    </c:otherwise>
</c:choose>
